var show_boo = true;

var rating_post_ids = ",";
function do_love_rating(a,count,type) {
	if (rating_post_ids.indexOf("," + a + ",") >= 0) {
		$("#rating_" + a).css("background", 'url("http://www.smzdmya.com/css/images/blLikeHover.png") no-repeat'),
		$("#textrating_" + a).html("已喜欢"),
		$("#collect_ul").html("<div class='collectError'>您也太喜欢了吧</div>"),
		$("#collect_div").attr("class", "collect_div1"),
		setTimeout("show()", 100),
		timeout_obj = setTimeout("$('#collect_div').fadeOut(1000)", 3e3);
		return;		
	}
	rating_post_ids = rating_post_ids + a + ",";
	jQuery.ajax({
		type: "GET",
		url: "/"+ type +"/add_love_ratings.html",
		dataType: "json",
		data: "love_id=" + a,
		success: function(b) {			
			$("#web_loading").remove();
			$("#rating_" + a).html(count+1);
			$("#textrating_" + a).html("已喜欢");
			$("#collect_ul").html("<div class='fxCollectSuccess'>已喜欢</div>");
			$("#collect_div").attr("class", "collect_div1");
			setTimeout("show()", 100);
			timeout_obj = setTimeout("$('#collect_div').fadeOut(1000)", 3000);			
		}
	});
	return;
}
function setlove_status() {
	$(".love_collect").each(function() {
		var b = $(this).attr("id");
		var c = b.split("_");
		var a = c[1];
		if (getCookie("lid_" + a) == "1") {
			$("#" + b).css("background", 'url("' + backgroud_url + '") no-repeat');
			$("#textcollect_" + a).html("已收藏");
		}
	});
	$(".love_rating").each(function() {
		var b = $(this).attr("id");
		var c = b.split("_");
		var a = c[1];
		if (getCookie("rating_lid_" + a) == "1") {
			$("#" + b).css("background", 'url("' + backgroud_url + '") no-repeat');
			$("#textrating_" + a).html("已喜欢");
		}
	});
}